﻿/*
 * XCoder v3.4.2011.0316
 * 作者：nnhy/X
 * 时间：2011-04-04 11:43:43
 * 版权：版权所有 (C) 新生命开发团队 2010
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.DataAccessLayer;

namespace NXCMS.WorkFlow
{
	/// <summary>
	/// 步骤
	/// </summary>
	[Serializable]
	[DataObject]
	[Description("步骤")]
	[BindTable("Step", Description = "步骤", ConnName = "WorkFlow", DbType = DatabaseType.SqlServer)]
	public partial class Step
	{
		#region 属性
		private Int32 _ID;
		/// <summary>
		/// 编号
		/// </summary>
		[Description("编号")]
		[DataObjectField(true, true, false, 10)]
		[BindColumn(1, "ID", "编号", "", "int", 10, 0, false)]
		public Int32 ID
		{
			get { return _ID; }
			set { if (OnPropertyChange("ID", value)) _ID = value; }
		}

		private Int32 _WorkflowID;
		/// <summary>
		/// 流程编号
		/// </summary>
		[Description("流程编号")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(2, "WorkflowID", "流程编号", "", "int", 10, 0, false)]
		public Int32 WorkflowID
		{
			get { return _WorkflowID; }
			set { if (OnPropertyChange("WorkflowID", value)) _WorkflowID = value; }
		}

		private Int32 _InstanceID;
		/// <summary>
		/// 实例编号
		/// </summary>
		[Description("实例编号")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(3, "InstanceID", "实例编号", "", "int", 10, 0, false)]
		public Int32 InstanceID
		{
			get { return _InstanceID; }
			set { if (OnPropertyChange("InstanceID", value)) _InstanceID = value; }
		}

		private String _DataVersionID;
		/// <summary>
		/// 数据版本编号
		/// </summary>
		[Description("数据版本编号")]
		[DataObjectField(false, false, true, 30)]
		[BindColumn(4, "DataVersionID", "数据版本编号", "", "nvarchar(30)", 0, 0, true)]
		public String DataVersionID
		{
			get { return _DataVersionID; }
			set { if (OnPropertyChange("DataVersionID", value)) _DataVersionID = value; }
		}

		private Int32 _NodeID;
		/// <summary>
		/// 编号
		/// </summary>
		[Description("编号")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(5, "NodeID", "编号", "", "int", 10, 0, false)]
		public Int32 NodeID
		{
			get { return _NodeID; }
			set { if (OnPropertyChange("NodeID", value)) _NodeID = value; }
		}

		private Int32 _ActionID;
		/// <summary>
		/// 操作编号
		/// </summary>
		[Description("操作编号")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(6, "ActionID", "操作编号", "", "int", 10, 0, false)]
		public Int32 ActionID
		{
			get { return _ActionID; }
			set { if (OnPropertyChange("ActionID", value)) _ActionID = value; }
		}

		private Int32 _PreviousStepID;
		/// <summary>
		/// 前借据步骤编号
		/// </summary>
		[Description("前借据步骤编号")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(7, "PreviousStepID", "前借据步骤编号", "", "int", 10, 0, false)]
		public Int32 PreviousStepID
		{
			get { return _PreviousStepID; }
			set { if (OnPropertyChange("PreviousStepID", value)) _PreviousStepID = value; }
		}

		private String _Owner;
		/// <summary>
		/// 
		/// </summary>
		[Description("")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(8, "Owner", "", "", "nvarchar(50)", 0, 0, true)]
		public String Owner
		{
			get { return _Owner; }
			set { if (OnPropertyChange("Owner", value)) _Owner = value; }
		}

		private DateTime _StartTime;
		/// <summary>
		/// 开始时间
		/// </summary>
		[Description("开始时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(9, "StartTime", "开始时间", "", "datetime2", 7, 0, false)]
		public DateTime StartTime
		{
			get { return _StartTime; }
			set { if (OnPropertyChange("StartTime", value)) _StartTime = value; }
		}

		private DateTime _FinishTime;
		/// <summary>
		/// 完成时间
		/// </summary>
		[Description("完成时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(10, "FinishTime", "完成时间", "", "datetime2", 7, 0, false)]
		public DateTime FinishTime
		{
			get { return _FinishTime; }
			set { if (OnPropertyChange("FinishTime", value)) _FinishTime = value; }
		}

		private String _State;
		/// <summary>
		/// 统计
		/// </summary>
		[Description("统计")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(11, "State", "统计", "", "nvarchar(10)", 0, 0, true)]
		public String State
		{
			get { return _State; }
			set { if (OnPropertyChange("State", value)) _State = value; }
		}

		private String _Operators;
		/// <summary>
		/// 操作者
		/// </summary>
		[Description("操作者")]
		[DataObjectField(false, false, true, 400)]
		[BindColumn(12, "Operators", "操作者", "", "nvarchar(400)", 0, 0, true)]
		public String Operators
		{
			get { return _Operators; }
			set { if (OnPropertyChange("Operators", value)) _Operators = value; }
		}

		private String _AllowUser;
		/// <summary>
		/// 允许用户
		/// </summary>
		[Description("允许用户")]
		[DataObjectField(false, false, true, 4000)]
		[BindColumn(13, "AllowUser", "允许用户", "", "nvarchar(4000)", 0, 0, true)]
		public String AllowUser
		{
			get { return _AllowUser; }
			set { if (OnPropertyChange("AllowUser", value)) _AllowUser = value; }
		}

		private String _AllowOrgan;
		/// <summary>
		/// 允许机构
		/// </summary>
		[Description("允许机构")]
		[DataObjectField(false, false, true, 4000)]
		[BindColumn(14, "AllowOrgan", "允许机构", "", "nvarchar(4000)", 0, 0, true)]
		public String AllowOrgan
		{
			get { return _AllowOrgan; }
			set { if (OnPropertyChange("AllowOrgan", value)) _AllowOrgan = value; }
		}

		private String _AllowRole;
		/// <summary>
		/// 允许角色
		/// </summary>
		[Description("允许角色")]
		[DataObjectField(false, false, true, 4000)]
		[BindColumn(15, "AllowRole", "允许角色", "", "nvarchar(4000)", 0, 0, true)]
		public String AllowRole
		{
			get { return _AllowRole; }
			set { if (OnPropertyChange("AllowRole", value)) _AllowRole = value; }
		}

		private String _Memo;
		/// <summary>
		/// 注释
		/// </summary>
		[Description("注释")]
		[DataObjectField(false, false, true, 400)]
		[BindColumn(16, "Memo", "注释", "", "nvarchar(400)", 0, 0, true)]
		public String Memo
		{
			get { return _Memo; }
			set { if (OnPropertyChange("Memo", value)) _Memo = value; }
		}

		private DateTime _AddTime;
		/// <summary>
		/// 添加时间
		/// </summary>
		[Description("添加时间")]
		[DataObjectField(false, false, false, 7)]
		[BindColumn(17, "AddTime", "添加时间", "", "datetime2", 7, 0, false)]
		public DateTime AddTime
		{
			get { return _AddTime; }
			set { if (OnPropertyChange("AddTime", value)) _AddTime = value; }
		}

		private String _AddUser;
		/// <summary>
		/// 添加用户
		/// </summary>
		[Description("添加用户")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(18, "AddUser", "添加用户", "", "nvarchar(50)", 0, 0, true)]
		public String AddUser
		{
			get { return _AddUser; }
			set { if (OnPropertyChange("AddUser", value)) _AddUser = value; }
		}

		private String _BackupNo;
		/// <summary>
		/// 备份编号
		/// </summary>
		[Description("备份编号")]
		[DataObjectField(false, false, true, 15)]
		[BindColumn(19, "BackupNo", "备份编号", "", "nvarchar(15)", 0, 0, true)]
		public String BackupNo
		{
			get { return _BackupNo; }
			set { if (OnPropertyChange("BackupNo", value)) _BackupNo = value; }
		}

		private String _BackupOperator;
		/// <summary>
		/// 备份操作者
		/// </summary>
		[Description("备份操作者")]
		[DataObjectField(false, false, true, 200)]
		[BindColumn(20, "BackupOperator", "备份操作者", "", "nvarchar(200)", 0, 0, true)]
		public String BackupOperator
		{
			get { return _BackupOperator; }
			set { if (OnPropertyChange("BackupOperator", value)) _BackupOperator = value; }
		}

		private DateTime _BackupTime;
		/// <summary>
		/// 备份时间
		/// </summary>
		[Description("备份时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(21, "BackupTime", "备份时间", "", "datetime2", 7, 0, false)]
		public DateTime BackupTime
		{
			get { return _BackupTime; }
			set { if (OnPropertyChange("BackupTime", value)) _BackupTime = value; }
		}

		private String _BackupMemo;
		/// <summary>
		/// 备份注释
		/// </summary>
		[Description("备份注释")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(22, "BackupMemo", "备份注释", "", "nvarchar(50)", 0, 0, true)]
		public String BackupMemo
		{
			get { return _BackupMemo; }
			set { if (OnPropertyChange("BackupMemo", value)) _BackupMemo = value; }
		}
		#endregion

		#region 获取/设置 字段值
		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
					case "ID" : return _ID;
					case "WorkflowID" : return _WorkflowID;
					case "InstanceID" : return _InstanceID;
					case "DataVersionID" : return _DataVersionID;
					case "NodeID" : return _NodeID;
					case "ActionID" : return _ActionID;
					case "PreviousStepID" : return _PreviousStepID;
					case "Owner" : return _Owner;
					case "StartTime" : return _StartTime;
					case "FinishTime" : return _FinishTime;
					case "State" : return _State;
					case "Operators" : return _Operators;
					case "AllowUser" : return _AllowUser;
					case "AllowOrgan" : return _AllowOrgan;
					case "AllowRole" : return _AllowRole;
					case "Memo" : return _Memo;
					case "AddTime" : return _AddTime;
					case "AddUser" : return _AddUser;
					case "BackupNo" : return _BackupNo;
					case "BackupOperator" : return _BackupOperator;
					case "BackupTime" : return _BackupTime;
					case "BackupMemo" : return _BackupMemo;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
					case "ID" : _ID = Convert.ToInt32(value); break;
					case "WorkflowID" : _WorkflowID = Convert.ToInt32(value); break;
					case "InstanceID" : _InstanceID = Convert.ToInt32(value); break;
					case "DataVersionID" : _DataVersionID = Convert.ToString(value); break;
					case "NodeID" : _NodeID = Convert.ToInt32(value); break;
					case "ActionID" : _ActionID = Convert.ToInt32(value); break;
					case "PreviousStepID" : _PreviousStepID = Convert.ToInt32(value); break;
					case "Owner" : _Owner = Convert.ToString(value); break;
					case "StartTime" : _StartTime = Convert.ToDateTime(value); break;
					case "FinishTime" : _FinishTime = Convert.ToDateTime(value); break;
					case "State" : _State = Convert.ToString(value); break;
					case "Operators" : _Operators = Convert.ToString(value); break;
					case "AllowUser" : _AllowUser = Convert.ToString(value); break;
					case "AllowOrgan" : _AllowOrgan = Convert.ToString(value); break;
					case "AllowRole" : _AllowRole = Convert.ToString(value); break;
					case "Memo" : _Memo = Convert.ToString(value); break;
					case "AddTime" : _AddTime = Convert.ToDateTime(value); break;
					case "AddUser" : _AddUser = Convert.ToString(value); break;
					case "BackupNo" : _BackupNo = Convert.ToString(value); break;
					case "BackupOperator" : _BackupOperator = Convert.ToString(value); break;
					case "BackupTime" : _BackupTime = Convert.ToDateTime(value); break;
					case "BackupMemo" : _BackupMemo = Convert.ToString(value); break;
					default: base[name] = value; break;
				}
			}
		}
		#endregion

		#region 字段名
		/// <summary>
		/// 取得步骤字段名的快捷方式
		/// </summary>
		public class _
		{
			///<summary>
			/// 编号
			///</summary>
			public const String ID = "ID";

			///<summary>
			/// 流程编号
			///</summary>
			public const String WorkflowID = "WorkflowID";

			///<summary>
			/// 实例编号
			///</summary>
			public const String InstanceID = "InstanceID";

			///<summary>
			/// 数据版本编号
			///</summary>
			public const String DataVersionID = "DataVersionID";

			///<summary>
			/// 编号
			///</summary>
			public const String NodeID = "NodeID";

			///<summary>
			/// 操作编号
			///</summary>
			public const String ActionID = "ActionID";

			///<summary>
			/// 前借据步骤编号
			///</summary>
			public const String PreviousStepID = "PreviousStepID";

			///<summary>
			/// 
			///</summary>
			public const String Owner = "Owner";

			///<summary>
			/// 开始时间
			///</summary>
			public const String StartTime = "StartTime";

			///<summary>
			/// 完成时间
			///</summary>
			public const String FinishTime = "FinishTime";

			///<summary>
			/// 统计
			///</summary>
			public const String State = "State";

			///<summary>
			/// 操作者
			///</summary>
			public const String Operators = "Operators";

			///<summary>
			/// 允许用户
			///</summary>
			public const String AllowUser = "AllowUser";

			///<summary>
			/// 允许机构
			///</summary>
			public const String AllowOrgan = "AllowOrgan";

			///<summary>
			/// 允许角色
			///</summary>
			public const String AllowRole = "AllowRole";

			///<summary>
			/// 注释
			///</summary>
			public const String Memo = "Memo";

			///<summary>
			/// 添加时间
			///</summary>
			public const String AddTime = "AddTime";

			///<summary>
			/// 添加用户
			///</summary>
			public const String AddUser = "AddUser";

			///<summary>
			/// 备份编号
			///</summary>
			public const String BackupNo = "BackupNo";

			///<summary>
			/// 备份操作者
			///</summary>
			public const String BackupOperator = "BackupOperator";

			///<summary>
			/// 备份时间
			///</summary>
			public const String BackupTime = "BackupTime";

			///<summary>
			/// 备份注释
			///</summary>
			public const String BackupMemo = "BackupMemo";
		}
		#endregion
	}
}